package downcasting;

public class DownTopMain {
	
	public static void main(String[] args) {
		
		Object obj = new DownTop();
		
		System.out.println(obj.hashCode());
		System.out.println(obj.toString());
		System.out.println(obj);
		
//		Object obj1 = new DownTop();
//		System.out.println(obj1.hashCode());
		
//		obj.up();	// ERROR
		
		// 다운캐스팅
		DownTop dt = (DownTop) obj;
		
		dt.up();
		System.out.println(dt.hashCode());
		System.out.println(dt.toString());
		System.out.println(dt);
		
	}
	
}
